-- GENERATED SPELL FOR [Chamber Overseer] --


function spell0_34197(pUnit, Event) --@Devastating Leap,n/a--
pUnit:FullCastSpellOnTarget(64820,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34197', 0, 1)
end

function spell1_34197(pUnit, Event) --@Devastating Leap,n/a--
pUnit:FullCastSpellOnTarget(64943,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34197', 0, 1)
end

function spell2_34197(pUnit, Event) --@Displacement Device,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(64783,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_34197', 1, 1)
end

function spell3_34197(pUnit, Event) --@Staggering Roar,Self--
pUnit:FullCastSpellOnTarget(64825,pUnit)
pUnit:RegisterEvent('Sorts_34197', 2500, 1)
end

function spell4_34197(pUnit, Event) --@Staggering Roar,Self--
pUnit:FullCastSpellOnTarget(64944,pUnit)
pUnit:RegisterEvent('Sorts_34197', 2500, 1)
end

function Sorts_34197(pUnit, Event)
local choix_sorts_34197 = math.random(0, 4)
if choix_sorts_34197 == 0 then
pUnit:RegisterEvent('spell0_34197', 1, 1)
end
if choix_sorts_34197 == 1 then
pUnit:RegisterEvent('spell1_34197', 1, 1)
end
if choix_sorts_34197 == 2 then
pUnit:RegisterEvent('spell2_34197', 1, 1)
end
if choix_sorts_34197 == 3 then
pUnit:RegisterEvent('spell3_34197', 1, 1)
end
if choix_sorts_34197 == 4 then
pUnit:RegisterEvent('spell4_34197', 1, 1)
end
end

function mob34197_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_34197', math.random(1500, 3000), 1)
end

function mob34197_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34197_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34197_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(34197, 1, 'mob34197_Action')
RegisterUnitEvent(34197, 2, 'mob34197_Leave')
RegisterUnitEvent(34197, 3, 'mob34197_Kill')
RegisterUnitEvent(34197, 4, 'mob34197_Die')
